function trans_img = affineTransform(img,trans)
%return the same size img with the affine transformation done
%trans is a struct created by maketform
%[a0 b0 0;a1 b1 0;a2 b2 1]
[trans_img XData YData] = imtransform(img,trans,'bicubic','YData',[1 size(img,1)],'XData',[1 size(img,2)]);